package com.wufeng.mapper;

import com.wufeng.entity.Evaluate;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author Hxh
 * @description 针对表【evaluate(心理测评表)】的数据库操作Mapper
 * @createDate 2024-01-14 23:39:19
 * @Entity com.wufeng.entity.Evaluate
 */
public interface EvaluateMapper extends BaseMapper<Evaluate> {

    @Update("update evaluate set evaCount = evaCount + 1 where evaluateId = #{evaluateId}")
    boolean addEvaCount(@Param("evaluateId") Integer evaluateId);


    List<Evaluate> getEvaluationByCondition(@Param("title") String title,
                                            @Param("type") Integer type,
                                            @Param("startIndex") Integer startIndex,
                                            @Param("pageSize") Integer pageSize);

    Integer countEvaluationByCondition(@Param("title") String title,
                                       @Param("type") Integer type);
}




